<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
require("sv/configsv.php");
$newpass = $_POST['newpass'];

$newpass1 = $_POST['newpass1'];

$post_username= $_POST['username'];
$code = $_GET['code'];
if($newpass == $newpass1)
{
	$enc_pass = md5($newpass);
	mysql_query("update register set password ='$enc_pass' where username ='$post_username'");
	mysql_query("update register set passreset ='0' where username ='$post_username'");
	
	echo " Your pass hass been update<p><a href='http://localhost/bdu1/daotao/sinhvien/index.php'>click here  to login</a>";
}
else
{
	echo" ok cilk vào  <a href='forgot_pass.php?code=$code&username=$post_username'>Cilck</a>";
}
?>
</body>
</html>
